package com.lin.commands;

import com.lin.service.RailRoadService;

/**
 * {@code Abstract} class defining an {@code Command} related to the {@code RailRoadService} functionality.
 */
public abstract class AbstractRailRoadServiceCommand implements Command {
    private RailRoadService receiver;

    /**
     * Create a new command.
     *
     * @param service receiver which will be called from this command.
     */
    public AbstractRailRoadServiceCommand(RailRoadService service){
        this.receiver = service;
    }

    /**
     * The {@code RailRoadService} that will be called from this command.
     *
     * @return {@code RailRoadService} that will be called from this command.
     */
    protected RailRoadService getReceiver() {
        return this.receiver;
    }
}
